#pragma once
#include "EpilExpressionCodeBase.h"


class EpilFieldExpressionCode : public EpilExpressionCodeBase
{
	EPIL_CODE_DECL( FieldExpression );

public:
	EpilFieldExpressionCode( const EpilLexLocation & location );
	virtual ~EpilFieldExpressionCode();

	EpilExpressionCodeBase *			GetTableExpression() const							{ return m_tableExpression; }
	void								SetTableExpression( EpilExpressionCodeBase * expr )	{ m_tableExpression = expr; }
	tstring								GetFieldName() const								{ return m_fieldName; }
	void								SetFieldName( const tstring & fieldName )			{ m_fieldName = fieldName; }
	
	virtual tstring						ToEpilCode( int indent = 0 ) const;

private:
	EpilExpressionCodeBase *			m_tableExpression;
	tstring								m_fieldName;
};